tools/insn-fuzz: Make use of LLVMFuzzerInitialize()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 1 Mar 2017 18:46:52 +0000 (18:46 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 Mar 2017 16:45:21 +0000 (16:45 +0000)
commit63092064eb1e6268357516715245a481db653e13
treeaa00f0cb95410efb72efbfa5985b89d52e8ece49
parent7dfd103efbbe1241d818dd0f9970a5459b2d728c
tools/insn-fuzz: Make use of LLVMFuzzerInitialize()

libfuzz can perform one-time initialisation by calling LLVMFuzzerInitialize().
Move emul_test_init() into this, to avoid repeating it on every
LLVMFuzzerTestOneInput() call.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/fuzz/x86_instruction_emulator/afl-harness.c
tools/fuzz/x86_instruction_emulator/fuzz-emul.c